@bg-color:#b7d4a8;

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font: bold 20px "Courier";
}

#main{
    width: 360px;
    height: 420px;
    background-color: @bg-color;
    margin: 100px auto;
    
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: space-around;

    //y游戏舞台
    #stage{
        width: 304px;
        height: 304px;
        border: 2px solid black;
        position: relative;
        //蛇的身体
        #snake{
          &>div{
            width: 10px;
            height: 10px;
            background-color: black;
            border: 1px solid @bg-color;
            position: absolute;
          }
        }
        //食物
        #food{
            width: 10px;
            height: 10px;
            position: absolute;
            //初始化一个位置
            left: 40px;
            top: 100px;
            display: flex;
            flex-flow: row wrap;
            justify-content: space-between;
            &>div{
               width: 4px;
               height: 4px;
               background-color: black;

               transform: rotate(45deg);
            }
        }
    }
    #score-penel{
        width: 300px;
        display: flex;
        flex-flow: row;
        justify-content: space-between;
    }
}

